Multilingual Modules

Introduction


jDownloads supports Multilingual Modules. In this article it is assummed you have already set up your site for multilingual Categories and Downloads. 

For more information see Article on Multilingual Support (opens in a separate window/tab)

In this article we will be using the jDownloads Top module as an example.  This module lists those Downloads that have been downloaded the most number of times.

Before starting it is worthwhile creating all the jDownloads 'menu' items in each language menu that you intend to make available to your users.

Note:
In order to display the Top Module at least one file has to have been downloaded. This applies to each language.

Important You will still need the default jD menu item 'List All Categories' in the regular Main menu.  This may be a 'hidden' menu item.

Create Multilingual Module

The first step is to click on the V4 button systemsection in the main Joomla 4 menu as shown on the first image opposite.



Next, as indicated on the second image opposite, click on V4 button site modules.


mod multi04multilang moduleJ4 01C


As expected, this shows the list of all the site modules.

Now click on the jDownloads Top module.
multilang moduleJ4 03Before editing anything click on the V4 button save as copy button as indicated opposite. This saved copy will become one of the multilingual Top modules.

There are some essential parameters that must be setup.

There are also other parameters, which are refered to here as 'optional parameters'. These 'optional' parameters define what extra information is shown such as 'Number of Downloads', 'Show creation date', 'Text Before' and so on.  Some optional parameters set styling.
multilang moduleJ4 04
It is sensible to set all of the 'optional parameters' in the first multlingual module so that there is a consistency of look and style.

Later we will make a copy of this first multilingual Top module for other languages. Only the Essential parameters and the 'Menu Assignment' settings will need to be adjusted.

Of course the 'optional parameters' may be setup for each module individually if preferred.
After clicking on the V4 button save as copy button, a new invocation of the module will be automatically created with a name such as jDownloads Top (2) as illustrated opposite.mod multi02
Remember that in order to display the Top Module for a particular language at least one file in that language has to have been downloaded previously.

Essential Module Tab settings

In this example the 'Essential' parameters are indicated by a red arrow.
The 'optional' parameters are inicated with green arrows.

1. Change the Title field to something appropriate. In this example the '2' has been replaced by 'DE' to denote the language is set to German.  If we were setting up say a French Language Module then a sutable title would perhaps be 'Module supérieur'.

2. Select the target position in your template.

3. Change the Status to Published.

4. And most importantly,  select the target Language which in this case is German.

The Text Before and Text After options, which appear at the start and end of the list, both support the language selection as illustrated below.

When later setting up another Top Module for a different language it is simpler to make a copy of the first language module and edit that copy as appropriate.
mod multi03
Because we will be making a copy of this 'multilingual' module for other languages then it is convenient to add any required text for these 'optional parameters' in all the languages used on your site as illustated below.
jDownloads supports the 'language selector' pairs such as {en-GB}...{/en-GB}, {de-DE}...{/de-DE} and so on.

The test example used in writing this article was set for four languages: English, French,  German and Arabic.  The Arabic is used to check the "right to left" CSS.

multilang moduleJ4 13Amultilang moduleJ4 13Bmultilang moduleJ4 13Cmultilang moduleJ4 13D

Menu Assignment Tab

This is a key step as it controls which pages the module will appear upon.

First make sure that you select the option 'Only on the pages selected'. button pages onlyIn this example, which is setting the English Language version, then ensure that only the EN-GB menu items, as indicated with the relevant flag flag en , are selected.

Ensure those for any other language are NOT selected.

BUT Always set the List All jD Cats in the Main Menu.

When Done then do a Save & Close after adjusting any of the other options in the Module tab.

Note: If you subsequently create a new menu item then the module will not show on that page until you include it in the relevant Menu in the Menu Assignment tab
mod multi06

Further Language Modules

To create a module in other languages then start by making a copy of the first language module.  If you have used the 'language selectors' as suggested then you only need to set the the Essential module tab parameters and select the menu items in the Menu assignment tab.

Example Views




The two images opposite illustrate using the 'Text before' and Text After' options with the Joomla language selectors.

Also shown are text for number of times downloaded (Hits), Date and Category.  Also the category has been set as a link. 

The German language TOP module has also been set to show as a numerical listing and to use a limited number of characters in the Download name.
multilang moduleJ4 12multilang moduleJ4 12A


ColinM March 2023 modified June 2023

Print Email

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.